package com.ekalenchuk.postAd.domain.commercial;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ekalenchuk.postAd.domain.site.FieldDictionary;

@Entity
@Table(name="field_value")
public class FieldValue implements Serializable {

	private static final long serialVersionUID = -1876497723812004746L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="id")
	private Long id;
	
	@ManyToOne
	@JoinColumn(name="commercial_id")
	private Commercial commercial;
	
	@ManyToOne
	@JoinColumn(name="field_id")
	private FieldDictionary field;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Commercial getCommercial() {
		return commercial;
	}

	public void setCommercial(Commercial commercial) {
		this.commercial = commercial;
	}

	public FieldDictionary getField() {
		return field;
	}

	public void setField(FieldDictionary field) {
		this.field = field;
	}

	
}
